#include <stdio.h>
#include <unistd.h>
#include <string.h>
#define NUM 102
int main()
{
    char buf[NUM] = "\0";
    const char* lab = "|/-\\";
    int cnt = 0;
    while(cnt <= 100)
    {
        printf("[%-100s][%d%%]%c\r",buf,cnt,lab[cnt%4]);
        
        buf[cnt++] = '=';
        fflush(stdout);
        usleep(30000);
    }
    printf("\n");
    return 0;
}
